	use "$data/data_JPE_2019_deidentified.dta", clear
	
	******************************************************
	***		 TABLES S23 and S24 - BALANCE TEST   	 	***
	******************************************************	
	

	forvalues gender = 1/1 {
		
		preserve
		
			foreach var in age_at_test black hispanic white time_hours2 { 

				mean `var' 				if any_PK == 0 & any_PA == 0 & female == `gender' & in_experiment==1
				
				reg `var' any_PK any_PA if female == `gender' & in_experiment==1, robust 
			
			}
			
		restore
	}


	************************************************************
	*** TABLE S25 - ITT on CHOICES in LUCK EXPERIMENT *
	************************************************************
	
	replace inequalitylucky = inequalitylucky * 10
	
	
	gen male = 1 - female

	gen male_PK = any_PK * male
	gen male_PA = any_PA * male
	


	global experiment_controls time_dummy1 time_dummy2 time_dummy3 time_dummy4 time_dummy5 time_dummy6 time_dummy7 hours_missing expdummy1-expdummy26

	global demographic_controls age_at_test age_at_school female black hispanic
	

	
	mean inequalitylucky if any_PK == 0 & any_PA == 0 & male == 0
		
	reg inequalitylucky any_PK any_PA $experiment_controls, robust 
		
	reg inequalitylucky male_PK any_PK male any_PA male_PA $experiment_controls, robust 
		
		
	reg inequalitylucky any_PK any_PA $experiment_controls $demographic_controls, robust
		
	reg inequalitylucky male_PK any_PK male any_PA male_PA $experiment_controls $demographic_controls, robust
